import Test from './TestView';

import {connect} from 'react-redux';

const mapStateToProps = state => {

  const {list, listId} = state;

  return {
    list,
    listId
  }
}

const mapDispatchToProps = (dispatch,ownProps) => {
  onListClick = (id) => dispatch({
        type: 'SET_LIST_ID',
        id
      })

      return {onListClick};
}

export default connect(mapStateToProps, mapDispatchToProps)(Test);
